﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace RemoteImaging.Controls
{
    public partial class TimeRangeFilter : DevExpress.XtraEditors.XtraForm
    {
        public DateTime From
        { 
            get
            {
                return timeRangeEdit1.From;
            }
            set
            {
                timeRangeEdit1.From = value;
            }
        }


        public DateTime To 
        { 
            get
            {
                return timeRangeEdit1.To;
            }
            set
            {
                timeRangeEdit1.To = value;
            }
        }


        public TimeRangeFilter()
        {
            InitializeComponent();
        }

        private void okButton_Click(object sender, EventArgs e)
        {
            var valid = this.ValidateChildren();
            System.Diagnostics.Debug.WriteLine(valid);
            if (!(valid)) return;

            this.DialogResult = DialogResult.OK;
        }

    }
}